
var achievement = {};
(function( $ ){
	 "use strict";
	 
	var url = "server.json";
	var info = new Info("#achievements");
	
	//Achievement_ID, Side_ID, User_ID
	this.achieve = function(aid, sid, uid) { 
		
		$.getJSON(url+"?aid="+escape(aid)+"&sid="+escape(sid)+"&uid="+escape(uid), function(data) {
			if(data.state === 1) {
				notify(data.message, data.title);
			}
		});
	};
	
	function notify( message, title) {
		info.notify(message, title);
	};
	this.notify = notify;
	
}).call(achievement, jQuery);

